<main>
    <div class="panelgroup">
        <div class="panel-hd">
            <h3>售后单信息</h3>
        </div>
        <div class="panel-bd">
            <ul>
                <li>
                    <div class="key">
                        <span>售后单号</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.returnNum ? detailsData?.returnNum : '-'}}</span>
                        <app-button-copy [text]="detailsData?.returnNum"></app-button-copy>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>售后方式</span>
                    </div>
                    <div class="val color-red">
                        <span>{{detailsData?.type ? (detailsData?.type | saleTypeStatus) : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>售后状态</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.status | saleStatus }}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>申请时间</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.createTime ? detailsData?.createTime : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>超时时间</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.timeoutTime ? detailsData?.timeoutTime : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>回货单号</span>
                    </div>
                    <div class="val">
                        <span class="pointer" (click)="findOrderExpress(detailsData?.express)">{{detailsData?.express ?
                            detailsData?.express.expressNum + '（' + detailsData?.express.expressName + '）' :
                            '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>回货物流状态</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.expressStatus ? (detailsData?.expressStatus | expressStatus) : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>收货状态</span>
                    </div>
                    <div class="val">
                        <span>
                            {{ detailsData?.receiptStatus == 0 ? '未收到货' : (detailsData?.receiptStatus == 1 ? '已收到货' : '-') }}
                        </span>
                    </div>
                </li>
            </ul>
            <ul>
                <li>
                    <div class="key">
                        <span>退款原因</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.note ? detailsData?.note : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>售后入库单</span>
                    </div>
                    <div class="val">
                        <a [href]="'#/stock/putDetails/warehousingNumber?warehousingNumber=' + detailsData?.warehousingNumber"
                            target="view_window" class="pointer">{{detailsData?.warehousingNumber || '-'}}</a>
                    </div>
                </li>
            </ul>
            <ul>
                <li class="addLen">
                    <div class="key">
                        <span>退款备注</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.desc ? detailsData?.desc : '-'}}</span>
                    </div>
                </li>
            </ul>
            <ul>
                <li class="addLen">
                    <div class="key">
                        <span>退款附件</span>
                    </div>
                    <div class="val">
                        <img nz-image *ngFor="let item of detailsData?.imgs " nzSrc="{{item}}"
                            [nzFallback]="fallback" />
                        <!-- <span>{{detailsData?.imgs ? detailsData?.imgs : '-'}}</span> -->
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="panelgroup">
        <div class="panel-hd">
            <h3>订单信息</h3>
        </div>
        <div class="panel-bd">
            <ul>
                <li>
                    <div class="key">
                        <span>订单编号</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.orderNum ? detailsData?.order.orderNum : '-'}}</span>
                        <app-button-copy [text]="detailsData?.order?.orderNum"></app-button-copy>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>订单类型</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.sourceType | orderTypeStatus}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>状态</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.status | orderStatus}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>下单时间</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.createTime ? detailsData?.order.createTime : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>付款时间</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.payTime ? detailsData?.order.payTime : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>发货单号</span>
                    </div>
                    <div class="val">
                        <span class="pointer"
                            (click)="findOrderExpress(detailsData?.order.express)">{{detailsData?.order.express ?
                            detailsData?.order.express.expressNum + '（' + detailsData?.order.express.expressName + '）' :
                            '-'}}</span>
                        <app-button-copy [text]="detailsData?.order.express"></app-button-copy>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>发货物流状态</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.express ? (detailsData?.order.express.expressStatus | expressStatus)
                            : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>付款交易单号</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.payOrderNum ? detailsData?.order.payOrderNum : '-'}}</span>
                        <app-button-copy [text]="detailsData?.order.payOrderNum"></app-button-copy>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>订单现金</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.realPrice ? '￥' + detailsData?.order.realPrice : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>订单爱豆</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.aiDouAmount || '0'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>订单售后次数</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.afterSaleCount}}次
                            （成功{{detailsData?.order.afterSaleSuccessCount}}次）</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>用户售后次数</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.order.afterSaleTotal}}次
                            （成功{{detailsData?.order.afterSaleSuccessTotal}}次）</span>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="panelgroup">
        <div class="panel-hd">
            <h3>退款信息</h3>
        </div>
        <div class="panel-bd">
            <ul>
                <li>
                    <div class="key">
                        <span>退款金额</span>
                    </div>
                    <div class="val color-red">
                        <span>{{'￥' + detailsData?.refundPrice}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>返还爱豆</span>
                    </div>
                    <div class="val">
                        <span>{{'￥' + detailsData?.refundAiDouAmount || '0'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>退款状态</span>
                    </div>
                    <div class="val">
                        <span>{{detailsData?.refundState ? (detailsData?.refundState | saleRefundStatus) : '-'}}</span>
                    </div>
                </li>
                <li>
                    <div class="key">
                        <span>第三方编号</span>
                    </div>
                    <div class="val">
                        <span>-</span>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <ng-container *ngFor="let item of detailsData?.flowTraces; let i=index">
        <div class="panelgroup">
            <div class="panel-hd">
                <h3>处理结果{{ i + 1}}</h3>
            </div>
            <div class="panel-bd">
                <ul>
                    <li>
                        <div class="key">
                            <span>处理人</span>
                        </div>
                        <div class="val">
                            <span>{{item.auditUser ? item.auditUser : '-'}}</span>
                        </div>
                    </li>
                    <li>
                        <div class="key">
                            <span>处理时间</span>
                        </div>
                        <div class="val">
                            <span>{{item.auditTime ? item.auditTime : '-'}}</span>
                        </div>
                    </li>
                    <li>
                        <div class="key">
                            <span>处理结果</span>
                        </div>
                        <div class="val">
                            <span>{{item.agreeType ? (item.agreeType == 1 ? '不同意' : '同意' ): '-'}}</span>
                        </div>
                    </li>
                    <li *ngIf="i==1">
                        <div class="key">
                            <span>发货单号</span>
                        </div>
                        <div class="val">
                            <span class="pointer"
                                (click)="findOrderExpress(detailsData?.refundExpress)">{{detailsData?.refundExpress ?
                                detailsData?.refundExpress.expressNum + '（' + detailsData?.refundExpress.expressName +
                                '）' : '-'}}</span>
                        </div>
                    </li>
                </ul>
                <ul>
                    <li>
                        <div class="key">
                            <span>拒绝原因</span>
                        </div>
                        <div class="val">
                            <span>{{item.refuseReason ? item.refuseReason : '-'}}</span>
                        </div>
                    </li>
                </ul>
                <ul>
                    <li>
                        <div class="key">
                            <span>处理备注</span>
                        </div>
                        <div class="val">
                            <span>{{item.auditNote ? item.auditNote : '-'}}</span>
                        </div>
                    </li>
                </ul>
                <ul *ngIf="i==1">
                    <li class="addLen">
                        <div class="key">
                            <span>图片附件</span>
                        </div>
                        <div class="val">
                            <img nz-image *ngFor="let item of detailsData?.imgs2 " nzSrc="{{item}}"
                                [nzFallback]="fallback" />
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </ng-container>
    <div class="panelgroup" *ngIf="detailsData?.list.length != 0">
        <div class="panel-hd">
            <h3>售后内容</h3>
        </div>
        <div class="panel-bd">
            <div class="goodsTable">
                <div class="goodsHd">
                    <ul>
                        <li>商品信息</li>
                        <li>购买数量</li>
                        <li>购买单价</li>

                        <li>已售后数量</li>
                        <li>已退货数量</li>
                        <li>本次售后数量</li>
                        <li>优惠小计</li>

                        <li>本次售后小计</li>
                    </ul>
                </div>
                <div class="goodsCt">
                    <div class="attr-box" *ngFor="let attrItem of detailsData?.list">
                        <h3>{{ attrItem.groupName == 'item' ? '---' : attrItem.groupName }}</h3>
                        <dl *ngFor="let goodsItem of attrItem.list">
                            <dd>
                                <img nz-image nzSrc="{{goodsItem.groupIcon}}" [nzFallback]="fallback" />
                                <span (click)="toGoodsInfo(goodsItem.goodsId)">{{goodsItem.goodsName}}</span>
                            </dd>
                            <!-- 购买数量 -->
                            <dd>{{goodsItem.num}}</dd>
                            <!-- 购买单价 -->
                            <dd>￥{{goodsItem.price | number : '0.2-2'}}</dd>

                            <!-- 已售后数量 -->
                            <dd>{{goodsItem.returnTotal}}</dd>
                            <!-- 已退货数量 -->
                            <dd>{{goodsItem.returnNum}}</dd>
                            <!-- 本次售后数量 -->
                            <dd>{{goodsItem.afterSaleNum }}</dd>

                            <!-- 优惠小计 -->
                            <dd>￥{{goodsItem.favorablePrice | number : '0.2-2'}}</dd>
                            <!-- 本次售后小计 -->
                            <dd>￥{{((goodsItem.price - (goodsItem.favorablePrice / goodsItem.num)) *
                                goodsItem.afterSaleNum) | number : '0.2-2'}}</dd>
                        </dl>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="panelgroup" *ngIf="detailsData?.afterSales.length != 0">
        <div class="panel-hd">
            <h3>订单售后记录<em style="color: #b7b7b7;font-weight: lighter;font-size: 12px;">（和本订单有关的所有售后记录）</em></h3>
        </div>
        <div class="panel-bd">
            <nz-table #colSpanTable nzBordered [nzShowPagination]="false" [nzData]="[{}]">
                <thead>
                    <tr>
                        <th nzAlign="center">id</th>
                        <th nzAlign="center">申请时间</th>
                        <th nzAlign="center">当前状态</th>
                        <th nzAlign="center">售后单号</th>
                        <th nzAlign="center">退款成功总额</th>
                        <th nzAlign="center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let item of detailsData?.afterSales">
                        <td nzAlign="center">{{item.id}}</td>
                        <td nzAlign="center">{{item.createTime}}</td>
                        <td nzAlign="center">{{item.status | saleStatus}}</td>
                        <td nzAlign="center"> <a href=".#/service/saleDetails/{{item.id}}"
                                target="_blank">{{item.returnNum}}</a> </td>
                        <td nzAlign="center">￥{{item.refundPrice}}</td>
                        <td nzAlign="center">
                            <a nz-button nz-button-tdlink nzType="link" (click)="followModal(item.returnNum)">跟进</a>
                        </td>
                    </tr>
                </tbody>
            </nz-table>
        </div>
    </div>
    <div class="panelgroup" *ngIf="detailsData?.adjustOrders.length != 0">
        <div class="panel-hd">
            <h3>关联调节订单<em style="color: #b7b7b7;font-weight: lighter;font-size: 12px;">（和本订单有关的调节订单有关的记录）</em></h3>
        </div>
        <div class="panel-bd">
            <nz-table #colSpanTable nzBordered [nzShowPagination]="false" [nzData]="[{}]">
                <thead>
                    <tr>
                        <th nzAlign="center">id</th>
                        <th nzAlign="center">下单时间</th>
                        <th nzAlign="center">当前状态</th>
                        <th nzAlign="center">调节订单编号</th>
                        <th nzAlign="center">售后单号</th>
                        <th nzAlign="center">备注</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let item of detailsData?.adjustOrders">
                        <td nzAlign="center">{{item.id}}</td>
                        <td nzAlign="center">{{item.createTime}}</td>
                        <td nzAlign="center">{{item.status | orderStatus}}</td>
                        <td nzAlign="center">{{item.orderNum}}</td>
                        <td nzAlign="center">{{item.returnNum}}</td>
                        <td nzAlign="center">{{item.note ? item.note : '-'}}</td>
                    </tr>
                </tbody>
            </nz-table>
        </div>
    </div>
    <div class="submit-box">
        <nz-divider></nz-divider>
        <div class="bt-box">
            <app-bt-group [btType]="'primary'" (click)="followModal(detailsData?.returnNum)" [btText]="'跟进'">
            </app-bt-group>
            <app-bt-group [btType]="'primary'" (click)="logisticsModal()"
                [btDisabled]="detailsData?.status != '1' && detailsData?.status != '2' && detailsData?.status != '3' &&permission.userPermission.has('service:sale:modifyLogistics')"
                [btText]="'修改物流信息'"></app-bt-group>
            <app-bt-group [btType]="'primary'" (click)="saleModal()"
                [btDisabled]="detailsData?.status != '0'  && detailsData?.status  != '4' " [btText]="'售后处理'">
            </app-bt-group>
            <app-bt-group [btType]="'default'" [btText]="'返回'"></app-bt-group>
        </div>
    </div>
</main>

<nz-modal [(nzVisible)]="logisticsVisible" nzTitle="修改物流信息" (nzOnCancel)="handleCancel()" [nzFooter]="null">
    <ng-container *nzModalContent>
        <nz-form-item>
            <nz-form-label [nzSpan]="5">物流公司</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <nz-select nzPlaceHolder="请选择物流公司" nzAllowClear
                    [nzDropdownRender]="expressTemplate" [(ngModel)]="logisticsParam.expressType">
                    <nz-option nzCustomContent *ngFor="let o of expressOption.expressList" [nzValue]="o.content"
                        [nzLabel]="o.name">
                        <span>{{o.name}}</span>
                    </nz-option>
                </nz-select>
                <ng-template #expressTemplate>
                    <nz-spin *ngIf="expressOption.isLoading"></nz-spin>
                </ng-template>
    
                <!-- <input nz-input placeholder="请输入物流公司" [(ngModel)]="logisticsParam.expressType" /> -->
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSpan]="5">物流单号</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <input nz-input placeholder="请输入物流单号" [(ngModel)]="logisticsParam.expressNum" />
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-control [nzSpan]="18" [nzOffset]="4">
                <button nz-button nzType="primary" (click)="confirmLogistics()">确定</button>
                &nbsp;
                <button nz-button nzType="default" (click)="handleCancel()">取消</button>
            </nz-form-control>
        </nz-form-item>
    </ng-container>
</nz-modal>

<nz-modal [(nzVisible)]="saleVisible" nzTitle="售后处理" (nzOnCancel)="handleCancel()" [nzFooter]="null"
    [nzWidth]="'550px'">
    <ng-container *nzModalContent>
        <p class="tip-ps-tp" *ngIf="detailsData?.order?.renewalNo">※ 温馨提示：当前订单是以旧换机订单，请确认核对换机补贴再退款</p>
        <nz-form-item>
            <nz-form-label nz-col nzFlex="85px">售后方式</nz-form-label>
            <nz-form-control [nzSpan]="14">{{detailsData?.type ? (detailsData?.type | saleTypeStatus ) : '-'}}
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label nz-col nzFlex="85px">退款原因</nz-form-label>
            <nz-form-control [nzSpan]="14">{{detailsData?.note ? detailsData?.note : '-'}}</nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label nz-col nzFlex="85px">退款金额</nz-form-label>
            <nz-form-control [nzSpan]="14">{{detailsData?.refundPrice ? '￥' + detailsData?.refundPrice : '-'}}
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label nz-col nzFlex="85px">返还爱豆</nz-form-label>
            <nz-form-control [nzSpan]="14">{{detailsData?.refundAiDouAmount || '0'}}
            </nz-form-control>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label nz-col nzFlex="85px">处理意见</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <nz-radio-group [(ngModel)]="saleParam.agreeType">
                    <label nz-radio nzValue="0">同意</label>
                    <label nz-radio nzValue="1">不同意</label>
                </nz-radio-group>
            </nz-form-control>
        </nz-form-item>
    
        <nz-form-item *ngIf="saleParam.agreeType == '1' ">
            <nz-form-label nz-col nzFlex="85px" nzRequired>拒绝原因</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <!-- <nz-select nzAllowClear nzPlaceHolder="请选择" [(ngModel)]="saleParam.refuseReason">
                    <nz-option *ngFor="let item of noteOption.noteList" [nzValue]="item.content" [nzLabel]="item.content"></nz-option>
                </nz-select> -->
    
                <nz-select (nzScrollToBottom)="loadNoteMore()" nzPlaceHolder="请选择拒绝原因" nzAllowClear
                    [nzDropdownRender]="noteTemplate" [(ngModel)]="saleParam.refuseReason">
                    <nz-option nzCustomContent *ngFor="let o of noteOption.noteList" [nzValue]="o.content"
                        [nzLabel]="o.content">
                        <span>{{o.content}}</span>
                    </nz-option>
                </nz-select>
                <ng-template #noteTemplate>
                    <nz-spin *ngIf="noteOption.isLoading"></nz-spin>
                </ng-template>
    
            </nz-form-control>
        </nz-form-item>
        <nz-form-item *ngIf="saleParam.agreeType == '1' && saleParam.updateType == 2">
            <nz-form-label nz-col nzFlex="85px">物流公司</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <nz-select nzPlaceHolder="请选择物流公司" nzAllowClear
                    [nzDropdownRender]="expressTemplate" [(ngModel)]="saleParam.refundExpressType">
                    <nz-option nzCustomContent *ngFor="let o of expressOption.expressList" [nzValue]="o.content"
                        [nzLabel]="o.name">
                        <span>{{o.name}}</span>
                    </nz-option>
                </nz-select>
                <ng-template #expressTemplate>
                    <nz-spin *ngIf="expressOption.isLoading"></nz-spin>
                </ng-template>
            </nz-form-control>
        </nz-form-item>
        <nz-form-item *ngIf="saleParam.agreeType == '1' && saleParam.updateType == 2">
            <nz-form-label nz-col nzFlex="85px">物流单号</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <input nz-input placeholder="请输入物流单号" [(ngModel)]="saleParam.refundExpressNum" />
            </nz-form-control>
        </nz-form-item>
        <nz-form-item *ngIf="saleParam.agreeType == '1' && saleParam.updateType == 2">
            <nz-form-label nz-col nzFlex="85px">图片附件</nz-form-label>
            <nz-form-control>
                <ul class="saleImgList">
                    <li>
                        <img nz-image *ngFor="let item of saleParam.imgs2 " nzSrc="{{item}}" [nzFallback]="fallback" />
                    </li>
                    <li *ngIf="saleParam.imgs2.length <5">
                        <label for="file" class="upFile">
                            <i nz-icon nzType="plus"></i>
                            <span>上传图片</span>
                            <input id="file" type="file" multiple="multiple" accept="image/*" [(ngModel)]="inputVal"
                                (change)="handleFileInput($event,1)">
                        </label>
                    </li>
                </ul>
            </nz-form-control>
        </nz-form-item>
    
        <nz-form-item *ngIf="saleParam.agreeType == '0' && saleParam.updateType == 1 && detailsData?.type <= 2 ">
            <nz-form-label nz-col nzFlex="85px" nzRequired>退换货地址</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <nz-select (nzScrollToBottom)="loadMore()" nzPlaceHolder="请选择收货地址" nzAllowClear
                    [nzDropdownRender]="renderTemplate" [(ngModel)]="saleParam.addrId">
                    <nz-option nzCustomContent *ngFor="let o of addressOption.addressList" [nzValue]="o.id"
                        [nzLabel]="o.name">
                        <span>{{o.name}}</span>
                        <br>
                        <span [title]="o.region || '' + o.address || ''">{{o.region || '' + o.address || ''}}</span>
                    </nz-option>
                </nz-select>
                <ng-template #renderTemplate>
                    <nz-spin *ngIf="addressOption.isLoading"></nz-spin>
                </ng-template>
            </nz-form-control>
        </nz-form-item>
    
        <nz-form-item *ngIf="saleParam.agreeType == '1' ">
            <nz-form-label nz-col nzFlex="85px" nzRequired>备注</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <textarea rows="6" [(ngModel)]="saleParam.auditNote" nz-input placeholder="请输入备注"></textarea>
            </nz-form-control>
        </nz-form-item>
    
        <nz-form-item>
            <nz-form-label nz-col nzFlex="85px">跟进备注</nz-form-label>
            <nz-form-control [nzSpan]="14">
                <textarea rows="6" [(ngModel)]="saleParam.followText" nz-input placeholder="请输入跟进备注"></textarea>
            </nz-form-control>
        </nz-form-item>
    
        <nz-form-item>
            <nz-form-control [nzSpan]="18" [nzOffset]="3">
                <button nz-button nzType="primary" (click)="saleConfirm()">确定</button>
                &nbsp;
                <button nz-button nzType="default" (click)="handleCancel()">取消</button>
            </nz-form-control>
        </nz-form-item>
    </ng-container>
</nz-modal>

<nz-modal [(nzVisible)]="followVisible" nzTitle="跟进" (nzOnCancel)="handleCancel()" [nzFooter]="null"
    [nzWidth]="'1050px'">
    <ng-container *nzModalContent>
        <div class="importBox">
            <textarea rows="6" nz-input [(ngModel)]="followParam.content" placeholder="请输入内容，限制100字"
                [maxlength]="100"></textarea>
            <div class="bt-box">
                <label for="file" class="followFile">
                    <span>选择文件</span>
                    <input id="file" type="file" multiple="multiple" [(ngModel)]="inputVal"
                        (change)="handleFileInput($event,2)">
                </label>
                <font>请选择图片、office文件、PDF文件</font>
                <button nz-button nzType="primary" (click)="followerSave()">提交</button>
            </div>
            <ul>
                <li *ngFor="let item of followParam.enclosure; index as i">
                    <span>{{item.showUrl}}</span>
                    <a nz-button nz-button-tdlink nzType="link" (click)="deleteFollowImg(i)">删除</a>
                </li>
            </ul>
        </div>
        <div class="followTable" *ngIf="followList.length != 0">
            <h3>跟进记录</h3>
            <br>
            <nz-table #colSpanTable nzBordered [nzShowPagination]="false" [nzData]="[{}]">
                <thead>
                    <tr>
                        <th nzAlign="center">id</th>
                        <th nzAlign="center">跟进时间</th>
                        <th nzAlign="center">跟进人</th>
                        <th nzAlign="center">跟进内容</th>
                        <th nzAlign="center">附件</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let item of followList">
                        <td nzAlign="center">{{item.id}}</td>
                        <td nzAlign="center">{{item.createTime}}</td>
                        <td nzAlign="center">{{item.follower}}</td>
                        <td nzAlign="center">{{item.content}}</td>
                        <td nzAlign="center">
                            <ul>
                                <li *ngFor="let o of item.enclosure">
                                    <span>{{formUrl(o)}}</span>
                                    <a href="{{o}}">下载</a>
                                </li>
                            </ul>
                        </td>
                    </tr>
                </tbody>
            </nz-table>
        </div>
    </ng-container>
</nz-modal>

<!-- 物流 -->
<nz-modal [(nzVisible)]="flowVisible" nzTitle="物流" (nzOnCancel)="handleCancel()" [nzStyle]="{ width: '1000px' }"
    [nzFooter]="null">
    <ng-container *nzModalContent>
        <div class="panel-bd">
            <nz-timeline>
                <nz-timeline-item *ngFor="let item of logisticDetails; let i=index;">
                    <p style="margin-top:8px;font-size: 12px;">
                        {{item.station}}
                    </p>
                    <p style="padding-top:2px;font-size: 12px;color: #888;"> {{item.time}}</p>
                </nz-timeline-item>
            </nz-timeline>
        </div>
    </ng-container>
</nz-modal>
